package strategy;

public class CashContextFactory {
    public static CashContext createCashAccess(int type) {
        CashContext cc  = null;
        switch(type) {
            case 1:
                cc = new CashContext(new CashNormal());
                break;
            case 2:
                cc = new CashContext(new CashRebate(0.8d));
                break;
            case 3:
                cc = new CashContext(new CashRebate(0.7d));
                break;
            case 4:
                cc = new CashContext(new CashReturn(300d, 100d));
                break;
        }
        return cc;
    }
}
